#!/bin/bash

for i in {1..5}; do
  curl -s -o /dev/null https://repo1.maven.org/maven2/ --connect-timeout 5
  #echo $i > /tmp/num
done

if [[ $? -eq 0 ]];then
  echo "ok"
else
  echo "error"
  ssh -o "StrictHostKeyChecking no" root@10.202.16.154 "echo "10.202.94.141-Nexus不能联通repo1.maven.org,不能下载依赖包"|mail -s "10.202.94.141-服务器网络异常" zhang.zhe@y3.sg"
fi
